* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #cd5;
}

/* ===== FORMS ===== */

/* Login-formen inne i venstre meny (nav) */
nav form {
    width: 85%;
    max-width: 350px;
    margin: 0 auto;          /* sentrer formen i nav */
    border: 3px solid #888;
    padding: 20px;
    background: #cde;
    border-radius: 20px;
    height: auto;            /* la innholdet bestemme høyden */
}

/* Evt. andre spesielle former */
#form2 {
    width: 325px;
    height: 230px;
    border: 3px solid #888;
    padding: 10px;
    background: #f50;
    border-radius: 20px;
}

/* ===== HEADER ===== */

header {
    background-color: #cde; /* text-align: center; font-size: 11px; */
    padding: 10px;
    color: #000;
}

/* ===== LAYOUT: VENSTRE / HØYRE ===== */

/* Venstre kolonne (meny / login) */
nav { /* box to the left */
    float: left;
    width: 25%;
    /* height: 380px;  only for demonstration, should be removed */
    background: #cd5;
    padding: 15px;
}

/* Style på liste i meny – hvis du bruker <ul> inni nav */
nav ul {
    list-style-type: none;
    padding: 0;
}

/* Hovedområde (kamera-bildet) */
mainarea,
#mainarea { /* box to the right */
    float: left;
    padding: 10px;
    width: 75%;
    background-color: rgb(177, 177, 177);
    /* height: 100%;  height: 380px;  only for demonstration, should be removed */
}

/* Valgfri ekstra info-boks til høyre hvis du bruker den */
infoarea,
#infoarea {
    float: left;
    padding: 10px;
    width: 330px;
    background-color: rgb(177, 177, 7);
}

/* Clear floats etter kolonnene */
section:after {
    content: "";
    display: table;
    clear: both;
}

/* ===== FOOTER ===== */

footer {
    background-color: #cd5;
    padding: 10px;
    text-align: center;
    color: white;
}

/* ===== TABELLER ===== */

table {
    width: 100%;
    padding: 8px 6px;
}

/* table,th,td{border:1px solid black;border-collapse:collapse;} */

th,
td {
    padding: 8px 6px;
    text-align: center;
    font-size: 12px;
}

table#t01 tr:nth-child(even) {
    background-color: #dee;
}

table#t01 tr:nth-child(odd) {
    background-color: #eed;
}

table#t02 {
    background-color: rgb(177, 177, 177);
    color: white;
    border: none;
    border-collapse: collapse;
    border-radius: 10px;
    padding: 8px 6px;
}

td#t02 {
    background-color: rgb(177, 177, 177);
    color: white;
    border: none;
    border-collapse: collapse;
    border-radius: 10px;
}

td#t03 {
    background-color: rgb(135, 253, 124);
}

td#t04 {
    background-color: rgb(255, 255, 0);
}

td#t05 {
    background-color: rgb(255, 0, 0);
}

/* table#t06{width: 100%;background-color: rgb(114, 25, 25);} */

td#t06 {
    padding: 8px 6px;
}

table#t06 {
    background-color: rgb(177, 177, 177);
    color: rgb(184, 220, 41);
    border: solid;
    border-collapse: collapse;
    border-radius: 10px;
}

/* ===== LENKER SOM KNAPPER ===== */

a#a01 {
    float: right;
    background: rgb(56, 94, 198);
    padding: 10px;  /* 15px; */
    color: #fff;
    border-radius: 10px;
    margin-right: 10px;
    border: none;
    text-decoration: none;
}

a#a01:hover {
    opacity: .7;
}

a#a02 {
    /* float: center;  – ugyldig, fjernet */
    background: rgb(56, 94, 198);
    padding: 5px;  /* 15px; */
    color: #fff;
    border-radius: 10px;
    width: 15%;
    border: none;
    text-decoration: none;
}

a#a02:hover {
    opacity: .7;
}

/* ===== GENERELLE INPUT / LABEL / BUTTON ===== */

input {
    display: block;
    border: 2px solid #ccc;
    width: 95%;
    padding: 10px;
    margin: 10px auto;
    border-radius: 5px;
}

label {
    color: #555;
    font-size: 18px;
    padding: 10px;
}

button {
    float: right;
    background: rgb(56, 94, 198);
    padding: 10px; /* 15px; */
    color: #fff;
    border-radius: 5px;
    margin-right: 10px;
    border: none;
}

#button2 {
    float: right;
    background: rgb(56, 94, 98);
    padding: 15px; /* 15px; */
    color: #fff;
    border-radius: 5px;
    margin-right: 10px;
    border: none;
}

button:hover {
    opacity: .7;
}

/* ===== SPESIFIKT FOR LOGIN-FORM I NAV ===== */

nav label {
    display: block;
    color: #555;
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 4px;
    padding: 0;
}

nav input {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 0 0 12px 0;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

nav button {
    display: block;
    width: 100%;
    margin-top: 10px;
    margin-right: 0;
    float: none;
}

/* ===== FEILMELDING ===== */

.error {
   background: #F2DEDE;
   color: #0c0101;
   padding: 10px;
   width: 95%;
   border-radius: 5px;
   margin: 20px auto;
}

/* ===== OVERSKRIFTER ===== */

h2 {
    text-align: center;
    margin-bottom: 10px;
}

/* ===== RESPONSIV LAYOUT ===== */
/* Når skjermen er smal, stacker vi kolonnene over hverandre */

@media (max-width: 800px) {
    nav,
    mainarea,
    #mainarea,
    infoarea,
    #infoarea {
        width: 100%;
        height: auto;
    }
}
/* ==== MENY GRID LAYOUT ==== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  
    gap: 10px;
    margin-top: 20px;
}

/* ==== LIKE BREDDE-KNAPPER ==== */
.menu-btn {
    display: block;
    background: #3A6EA5;        /* ny mild blåfarge */
    color: #fff;
    padding: 8px;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    width: 100%;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);   /* subtil skygge */
    transition: 0.15s ease-in-out;
}

.menu-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);             /* litt “løft”-effekt */
}
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.logout-btn {
    background: #c0392b;       /* rolig rød */
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: 0.15s ease-in-out;
}

.logout-btn:hover {
    background: #e74c3c;
    transform: translateY(-1px);
}
/* ===== HUSREGLER SIDE ===== */

.house-rules {
    max-width: 900px;
    margin: 0 auto;
    background: #eef3ff;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.house-rules h1 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 10px;
}

.rules-intro,
.rules-outro {
    font-size: 14px;
    margin-bottom: 16px;
}

.rules-section {
    margin-bottom: 16px;
}

.rules-section h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
}

.rules-section ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
}

/* Litt tettere tekst på små skjermer */
@media (max-width: 800px) {
    .house-rules {
        padding: 16px;
        border-radius: 12px;
    }
}
/* ===== MINSTEMÅL-TABELL ===== */

.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

.rules-table th,
.rules-table td {
    padding: 6px 8px;
    text-align: left;
}

.rules-table thead {
    background: #dbeafe; /* lys blå */
    font-weight: bold;
}

.rules-table tbody tr:nth-child(even) {
    background: #f3f4f6; /* lys grå */
}

.rules-table tbody tr:nth-child(odd) {
    background: #ffffff;
}
/* ===== Range radio (tid) ===== */
.range-form {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 10px 0;
  flex-wrap: wrap; /* gjør at den bryter pent på mobil */
}

/* Viktig: nøytraliser global label-padding og stor font her */
.range-form .range-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;          /* <-- fjerner label { padding:10px } */
  font-size: 16px;     /* litt mindre enn 18 */
  color: #555;
}

/* Viktig: nøytraliser global input-regel for radio */
.range-form input[type="radio"] {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
}

.gallery-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-card {
  background: #dde;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.gallery-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 10px;
}

.gallery-meta {
  font-size: 13px;
  margin-bottom: 8px;
}

.gallery-status {
  font-weight: bold;
  margin-bottom: 8px;
}

.gallery-actions a {
  display: inline-block;
  background: rgb(56, 94, 198);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  margin-right: 8px;
}

.gallery-actions a:hover {
  opacity: .7;
}

.gallery-edit-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.gallery-edit-left {
  flex: 1 1 380px;
  min-width: 0;
}

.gallery-edit-right {
  flex: 1 1 280px;
  min-width: 0;
}

.gallery-preview-box {
  background: #dde;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  width: 100%;
}

.gallery-preview-box img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 10px;
}

@media (max-width: 800px) {
  .gallery-edit-wrap {
    display: block;
  }

  .gallery-edit-left,
  .gallery-edit-right {
    width: 100%;
    max-width: 100%;
  }

  .gallery-preview-box {
    width: 100%;
    box-sizing: border-box;
  }

  .gallery-preview-box img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}